package com.edooteach.api.web.controller.auth;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.demo2do.core.entity.result.HttpResult;
import com.edooteach.api.entity.AuthLogin;

/**
 * 
 * @author wangliwang
 *
 */
@RestController
@RequestMapping("/api/auth")
public class AuthenticationController {
    
    /**
     * 
     * @param userKey
     * @param accountValue
     * @param accountName
     * @param login
     * @return
     */
    @RequestMapping(value = "/user-info", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public HttpResult userInfo(@RequestParam("userKey") String userKey,
                               @RequestParam("accountValue") String accountValue,
                               @RequestParam("accountName") String accountName,
                               @RequestBody AuthLogin login) {
        
        HttpResult httpResult = new HttpResult();
        
//        Map<String, Object> result = userService.updateUserInfo(userKey, accountValue, accountName, login);
        
        return httpResult.success()
                         .message("获取User、UserAccount信息成功");
//                         .data(result);
        
    }
    
}
